package com.wfm.service;


import com.wfm.service.domain.UatDeployWithBLOBs;
import com.wfm.service.mapper.UatDeployMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
// 因为在mapper接口上， 没有标注@Mapper，所以springboot扫描不到，因此需要这边指定扫描哪个包
// 如果有@Mapper，其实可以不用指定@MapperScan注解
@MapperScan("com.wfm.service.mapper")
public class MybatisgeneratorApplication {

	@Autowired
    UatDeployMapper mapper;

	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(MybatisgeneratorApplication.class, args);
		UatDeployMapper uatDeployMapper = context.getBean("uatDeployMapper", UatDeployMapper.class);
		UatDeployWithBLOBs uatDeployWithBLOBs = new UatDeployWithBLOBs();
		uatDeployWithBLOBs.setA("a");
		uatDeployMapper.insertSelective(uatDeployWithBLOBs);
	}

}
